package com.iurac.service;

import com.iurac.domain.Borrow;
import com.iurac.domain.BorrowHistory;
import com.iurac.exception.BorrowException;
import com.iurac.vo.BorrowVo;

import java.util.List;

public interface BorrowService {
    List<BorrowVo> getBorrowByCondition(String title, String username, String userId);

    boolean deleteBorrowById(String id) throws BorrowException;

    List<BorrowHistory> getBorrowHistoryByCondition(String title, String username, String userId, String startDate, String endDate);

    boolean deleteBorrowHistoryById(String id) throws BorrowException;

    List<BorrowVo> getBorrowByUid(String userId);

    boolean borrowBook(Borrow borrow) throws BorrowException;

    List<BorrowVo> getBorrowByAccount(String account);

    boolean returnBook(String bid, BorrowHistory borrowHistory) throws BorrowException;

    boolean renewBook(String id, String renewDay) throws BorrowException;
}
